* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* 左侧导航栏 */
.sidebar {
    width: 300px;
    background: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #34495e;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sidebar-header p {
    font-size: 12px;
    color: #95a5a6;
}

.refresh-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #34495e;
    border: none;
    color: #ecf0f1;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #415b76;
}

.refresh-btn:active {
    transform: rotate(180deg);
}

/* 下拉框样式 */
.select-container {
    padding: 15px 20px;
    background: #2c3e50;
    border-bottom: 1px solid #34495e;
}

.select-group {
    margin-bottom: 12px;
}

.select-group:last-child {
    margin-bottom: 0;
}

.select-label {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 6px;
    display: block;
}

.select-box {
    width: 100%;
    padding: 8px 12px;
    background: #34495e;
    border: 1px solid #415b76;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.select-box:hover {
    border-color: #3498db;
}

.select-box:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.select-box option {
    background: #2c3e50;
    color: #ecf0f1;
}

.nav-tree {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.api-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.api-list-empty {
    padding: 40px 20px;
    text-align: center;
    color: #95a5a6;
    font-size: 13px;
}

.api-list-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: #ecf0f1;
    font-size: 13px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.api-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #95a5a6;
}

.api-list-item.active {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border-left-color: #3498db;
    font-weight: 500;
}

/* 内容容器 */
.content-container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 文档区 */
.dotbox {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.dotbox-header {
    padding: 15px 25px;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dotbox-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.dotbox-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

/* 显示隐藏控制 */
.dotbox-body .empty-state {
    display: block;
}

.dotbox-body .markdown-body {
    display: none;
}

.dotbox-body.has-content .empty-state {
    display: none;
}

.dotbox-body.has-content .markdown-body {
    display: block;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
}

/* Markdown 文档样式 */
.markdown-body {
    font-size: 14px;
    line-height: 1.6;
}

.markdown-body h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.markdown-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 25px 0 15px 0;
}

.markdown-body p {
    margin-bottom: 15px;
}

.markdown-body ul {
    margin-bottom: 15px;
    padding-left: 25px;
}

.markdown-body li {
    margin-bottom: 8px;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 13px;
}

.markdown-body table th {
    background: #f8f9fa;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border: 1px solid #e0e6ed;
}

.markdown-body table td {
    padding: 10px;
    border: 1px solid #e0e6ed;
}

.markdown-body table tr:nth-child(even) {
    background: #f8f9fa;
}

.markdown-body pre {
    background: #282c34;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.markdown-body code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #e83e8c;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    color: #abb2bf;
}

.markdown-body strong {
    font-weight: 600;
    color: #2c3e50;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid #e0e6ed;
    margin: 30px 0;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* 可编辑单元格样式 */
.editable-cell-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background: #fff;
    color: #2c3e50;
    box-sizing: border-box;
}

.editable-cell-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.markdown-body table td.editable-cell {
    padding: 4px;
}

/* 基本信息样式 */
.api-basic-info {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.api-basic-info h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.basic-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.basic-info-list li {
    margin-bottom: 8px;
    font-size: 13px;
}

.basic-info-list li:last-child {
    margin-bottom: 0;
}

.basic-info-list strong {
    display: inline-block;
    min-width: 120px;
    color: #2c3e50;
}

.basic-info-list code {
    background: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #e83e8c;
    border: 1px solid #e0e6ed;
}

/* 更新日志样式 */
.api-changelog {
    margin-bottom: 25px;
}

.api-changelog h3 {
    margin-top: 0;
}

/* 各类参数区块样式 */
.api-headers,
.api-query-params,
.api-route-params,
.api-body-params,
.api-response,
.api-error-codes {
    margin-bottom: 25px;
}

.api-headers h3,
.api-query-params h3,
.api-route-params h3,
.api-body-params h3,
.api-response h3,
.api-error-codes h3 {
    margin-top: 0;
}

/* OBJECT参数样式 */
.api-object-params {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #9b59b6;
}

.api-object-params h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.api-object-params table {
    background: #fff;
}

/* 响应示例容器样式 */
#response-example-container h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

#response-example-container h4:first-child {
    margin-top: 0;
}

#response-example-container pre {
    margin-bottom: 15px;
}

/* 文档路径样式 */
.api-file-path {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

/* 接口描述样式 */
.api-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 请求示例和响应示例样式 */
.api-request-example,
.api-response-example {
    margin-bottom: 25px;
}

.api-request-example h3,
.api-response-example h3 {
    margin-top: 0;
}

/* ==================== 调试区布局样式 ==================== */

/* 调整文档区宽度为50% */
.dotbox {
    width: 50%;
    border-right: 1px solid #e0e6ed;
}

/* 调试区容器 */
.debug-container {
    width: 50%;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

/* ==================== 调试区组件样式 ==================== */

/* 调试区头部 */
.debug-header {
    padding: 15px 25px;
    background: #fff;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.debug-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

/* 发送请求按钮 */
.debug-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

.debug-send-btn:hover {
    background: linear-gradient(135deg, #7a8ff0 0%, #8a5bb2 100%);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.debug-send-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

.debug-send-btn .btn-icon {
    font-size: 10px;
}

.debug-send-btn .btn-text {
    font-size: 12px;
}

/* 调试区内容区域 */
.debug-content {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

/* 调试区主内容 */
.debug-main {
    padding: 25px;
}

/* 调试区空状态 */
.debug-content > .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
}

/* 调试区各个section - 扁平化样式 */
.debug-section {
    margin-bottom: 25px;
}

.debug-section:last-child {
    margin-bottom: 0;
}

.debug-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 25px 0 15px 0;
}

.debug-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

.debug-section-tip {
    font-size: 12px;
    font-weight: normal;
    color: #95a5a6;
    font-style: italic;
}

.debug-section-content {
    padding: 0;
}

/* 基本信息区样式 */
.debug-basic-info .debug-section-content {
    padding: 0;
}

.debug-basic-url {
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.debug-basic-url .method {
    font-weight: 600;
    color: #27ae60;
}

.debug-basic-url .method.POST {
    color: #3498db;
}

.debug-basic-url .method.PUT {
    color: #f39c12;
}

.debug-basic-url .method.DELETE {
    color: #e74c3c;
}

/* 请求头表格样式 - 与文档区一致 */
.debug-headers table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 13px;
}

.debug-headers table th {
    background: #f8f9fa;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border: 1px solid #e0e6ed;
}

.debug-headers table td {
    padding: 10px;
    border: 1px solid #e0e6ed;
}

.debug-headers table tr:nth-child(even) {
    background: #f8f9fa;
}

.debug-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background: #fff;
    color: #2c3e50;
    box-sizing: border-box;
}

.debug-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* 请求参数编辑器样式 - 代码块风格 */
.debug-params-wrapper {
    margin-bottom: 20px;
}

.debug-params-wrapper pre {
    background: #282c34;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
}

.debug-params-editor {
    width: 100%;
    min-height: 200px;
    padding: 0;
    border: none;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    background: transparent;
    color: #abb2bf;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

.debug-params-editor::placeholder {
    color: #5c6370;
}

/* 响应结果区样式 */
.debug-response .debug-section-title {
    display: inline-block;
    margin-right: 12px;
}

.debug-response-time {
    font-size: 12px;
    font-weight: normal;
    color: #27ae60;
    padding: 2px 8px;
    background: #d5f4e6;
    border-radius: 3px;
    display: inline-block;
}

/* 响应状态 */
.debug-response-status {
    display: inline-block;
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
}

.debug-status-code {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    color: #27ae60;
    margin-right: 8px;
}

.debug-status-code.error {
    color: #e74c3c;
}

.debug-status-text {
    font-size: 14px;
    color: #555;
}

/* 响应头折叠区域 */
.debug-response-headers-container {
    margin-bottom: 15px;
}

.debug-collapse-header {
    display: inline-block;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    user-select: none;
}

.debug-collapse-header:hover {
    color: #3498db;
}

.debug-collapse-icon {
    font-size: 12px;
    color: #7f8c8d;
    transition: transform 0.2s;
    display: inline-block;
    margin-right: 6px;
}

.debug-collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.debug-collapse-title {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
}

.debug-collapse-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.debug-collapse-content.collapsed {
    max-height: 0;
}

.debug-response-headers-pre {
    background: #282c34;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
}

.debug-response-headers-pre code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #abb2bf;
    background: transparent;
}

/* 响应体样式 */
.debug-response-body-container {
    margin-bottom: 20px;
}

.debug-response-body-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

.debug-response-body-pre {
    background: #282c34;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
    max-height: 600px;
    overflow-y: auto;
}

.debug-response-body-pre code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #abb2bf;
    background: transparent;
    line-height: 1.6;
}

/* 空状态样式 */
.debug-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.debug-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.debug-empty-text {
    font-size: 14px;
    line-height: 1.6;
}

/* ==================== OBJECT参数表格复制功能样式 ==================== */

/* OBJECT参数标题容器 */
.object-param-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.object-param-header h4 {
    margin: 0;
    flex: 1;
}

/* 复制表格按钮 */
.copy-table-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.copy-table-btn:hover {
    background: linear-gradient(135deg, #7a8ff0 0%, #8a5bb2 100%);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.copy-table-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}

/* 表格容器 */
.object-tables-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 表格包装器 */
.object-table-wrapper {
    position: relative;
    padding-top: 35px;
    border-left: 3px solid #9b59b6;
    padding-left: 15px;
    margin-bottom: 15px;
    background: rgba(155, 89, 182, 0.02);
    border-radius: 4px;
    padding-bottom: 15px;
}

/* 表格实例头部 */
.table-instance-header {
    position: absolute;
    top: 8px;
    left: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* 表格实例编号 */
.table-instance-number {
    font-size: 13px;
    font-weight: 600;
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.1);
    padding: 4px 10px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* 删除表格按钮 */
.delete-table-btn {
    background: #e74c3c;
    border: none;
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(231, 76, 60, 0.3);
}

.delete-table-btn:hover {
    background: #c0392b;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.4);
    transform: translateY(-1px);
}

.delete-table-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(231, 76, 60, 0.3);
}

/* 调整第一个表格样式（不在wrapper中） */
.object-tables-container > table:first-child {
    margin-bottom: 0;
}

/* 表格实例内的表格 */
.object-table-wrapper table {
    margin-bottom: 0;
    background: #fff;
}

